package com.slz3.business.module.orderManagement.ordPayDetail.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.orderManagement.ordPayDetail.domain.OrdPayDetail;
import com.slz3.business.module.orderManagement.ordPayDetail.domain.OrdPayDetailCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class OrdPayDetailResAtomic extends OrdPayDetailResExecutor {

    public Mono<ServerResponse> add_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetail ordPayDetail) {
        return OrdPayDetailResSafeValid.add(req, ordPayDetail) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, ordPayDetail);
    }

    public Mono<ServerResponse> delete_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.delete(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetail ordPayDetail) {
        return OrdPayDetailResSafeValid.modify(req, ordPayDetail) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, ordPayDetail);
    }

    public Mono<ServerResponse> info_$OrdPayDetailUpdateLock(ServerRequest req) {
        return OrdPayDetailResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.auditSubmit(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.audit(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.auditReject(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.usingEnable(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$OrdPayDetailUpdateLock(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        return OrdPayDetailResSafeValid.usingDisable(req, ordPayDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
